function showAlertMessage(incomingMsg)
		{

			var msg = $.cookie("message");
			
			var hasClosedBefore = $.cookie("closed");

			//alert("hasClosedBefore: " + hasClosedBefore);

			
			//first time to open the page or
			//the scroll span has not been closed before
			if(hasClosedBefore != 1)
			{
				msg = incomingMsg;
				//alert("msg: " + incomingMsg);
				$("vha_alert_msg_span").text(msg);
				$("#vha_alert_navigation").show();
				
			}
			//the alert span has been closed before
			else
			{
				//if the message on server is not same as currrent one
				//show alert
				if((msg != 'undefined') && (msg != incomingMsg) )
				{
					msg = incomingMsg;
					$("#vha_alert_msg_span").text(incomingMsg);
					$("#vha_alert_navigation").show();
				}
			}
			$('.vha_close_event').click(function() {		
					
				$('.space, #vha_alert_navigation').fadeOut('slow', function() {
					$('.space, #vha_alert_navigation').addClass('display-none');
				});				
				
				$.cookie("closed", 1);
				$.cookie("message", incomingMsg);	
			});
		}
		
		$(function(){

			
			var incomingMsg = $("#vha-vca div.vha_page_alert p").text();
			showAlertMessage(incomingMsg);

			/*
			$.ajax({
				url: 'http://localhost/VC99/Event%20Alert/msgs.txt',
				type: "Get"
			}).done(function(data){
				incomingMsg = data;
			  	//alert("data: " + data);
			  	showAlertMessage(incomingMsg);
			});
			*/


			


		});